import aphw

e = aphw.Environment('foobar.env')

with e.create_db(42, flags=aphw.Flags.RECORD_NUMBER) as d:
    with aphw.Transaction(d):
        
        r = aphw.Record('x' * 1000);
        
        for i in xrange(1000000):
            d.insert(aphw.Key(), r)

e.close()
